#include <iostream>
#include <boost/version.hpp>
#include <boost/config.hpp>
#include <boost/timer.hpp>
#include <boost/progress.hpp>

#include <CGAL/Simple_cartesian.h>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_2 Point_2;
typedef Kernel::Segment_2 Segment_2;

using namespace std;
using namespace boost;

int main(int argc, char *argv[])
{
    Point_2 p(1, 1), q(10, 10);
    std::cout << "p = " << p << std::endl;
    std::cout << "q = " << q.x() << " " << q.y() << std::endl;
    std::cout << "sqdist(p,q) = "
              << CGAL::squared_distance(p, q) << std::endl;
    Segment_2 s(p, q);
    Point_2 m(5, 9);
    std::cout << "m = " << m << std::endl;
    std::cout << "sqdist(Segment_2(p,q), m) = "
              << CGAL::squared_distance(s, m) << std::endl;
    std::cout << "p, q, and m ";
    switch (CGAL::orientation(p, q, m))
    {
    case CGAL::COLLINEAR:
        std::cout << "are collinear\n";
        break;
    case CGAL::LEFT_TURN:
        std::cout << "make a left turn\n";
        break;
    case CGAL::RIGHT_TURN:
        std::cout << "make a right turn\n";
        break;
    }
    std::cout << " midpoint(p,q) = " << CGAL::midpoint(p, q) << std::endl;
    return 0;
}
int main3(int argc, char *argv[])
{
    progress_timer t;

    return 0;
}

int main2(int argc, char *argv[])
{
    timer t;
    cout << "max timespan:"
         << t.elapsed_max() / 3600 << "h" << endl;

    cout << "min timespan:"
         << t.elapsed_min() << "s" << endl;

    cout << "now time elapsed:"
         << t.elapsed() << "s" << endl;

    return 0;
}
